--DELETE FROM AUTOSC.CFG_TASK_TYPE;
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'SWEEP', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SWEEP'), 2, 'D', 'T', 5, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'NOTIFY', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'NOTIFY'), 1, 'D', 'T', 5, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'GATHER', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'GATHER'), 2, 'S', 'T', 5, 1440);

-- IPTDS task type
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'PDNS01_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'RDA_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'PDFPU01_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'PDFTS01_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'PDFTS01_RELI_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);	
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'HEALTHPG_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'DATAMINE_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'ISAUTOCHECKOUT_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'SHEMALARM_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'FILL_NOTIFICATION_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'STUCK_FILL_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'STUCK_UNBLANK_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'ABANDONED_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'QUENCH_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'COMPRESSOR_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'METERERROR_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'LATCHEDDATA_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'SHEM_CALL_FT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'SHEM'), 1, 'D', 'F', 1, 1440);

INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'IPM_FILE_COPY', 
(SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY = 'GATHER'), 2, 'S', 'T', 5, 1440);

INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'RDA_FILE_COPY', 
(SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY = 'GATHER'), 2, 'S', 'T', 5, 1440);

INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'DS_RELI_FILE_COPY', 
(SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY = 'GATHER'), 2, 'S', 'T', 3, 1440);

INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'MODALITY_RELI_FILE_COPY', 
(SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY = 'GATHER'), 2, 'S', 'T', 5, 1440);

--On Watch Wake up
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
	VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'ONWATCH_WAKEUP', 
		(SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY = 'ONWATCH'), 1, 'D', 'T', 1, 1440);

-- Insite Auto Checkout
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'ISAUTOCHECKOUT', 
	(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'DEFAULT'), 1, 'S', 'T', 1, 1440);

-- SHEM
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
	VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'SHEM_CALL', 
		(SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY = 'SHEM'), 1, 'S', 'F', 1, 1440);
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
	VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'SHEM_CHECK', 
		(SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY = 'SHEM'), 1, 'S', 'F', 1, 1440);
		
-- Prodiags Schedule Update
INSERT INTO AUTOSC.CFG_TASK_TYPE (task_type_id, task_type_name, task_category_id, max_retry_count,CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
	VALUES (CFG_TASK_TYPE_SEQ.nextVal, 'ONWATCH_TASK', 
		(SELECT task_category_id FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE task_category = 'ONWATCH'), 1, 'D', 'F', 1, 1440);				
COMMIT;